Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Typescript noImplicitThis #33250

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jan 13, 2025

  • Enable https://www.typescriptlang.org/tsconfig/#noImplicitThis
  • Wrap Vue Template-Syntax SFCs in defineComponent which makes type inference and linter work better
  • Move createApp calls outside the SFCs into separate files
  • Use PropType where appropriate
  • Some top-level component properties changed order as dictated by the linter
  • Fix all tsc and lint issues that popped up during these refactors

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 13, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 13, 2025
@silverwind silverwind added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jan 13, 2025
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppose all changed components have been tested?

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 15, 2025
@silverwind
Copy link
Member Author

Not really, but I can give it a quick round of testing later.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 15, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 15, 2025
@lunny lunny merged commit 4b21a6c into go-gitea:main Jan 15, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Jan 15, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 15, 2025
@silverwind silverwind deleted the noImplicitThis branch January 15, 2025 21:56
@wxiaoguang
Copy link
Contributor

Not really, but I can give it a quick round of testing later.

@lunny Author said they will do some tests. But since you have merged, suppose you have tested all changed components?

@lunny
Copy link
Member

lunny commented Jan 16, 2025

I have manually tested most pages except installations and only some of dimmers, dropdowns, modals, and tippies are tested. I will test the installation page later.

@wxiaoguang
Copy link
Contributor

I have manually tested most pages except installations and only some of dimmers, dropdowns, modals, and tippies are tested. I will test the installation page later.

Awesome, thank you for confirming!

@lunny
Copy link
Member

lunny commented Jan 16, 2025

I have manually tested most pages except installations and only some of dimmers, dropdowns, modals, and tippies are tested. I will test the installation page later.

Awesome, thank you for confirming!

I can confirm that the installation can be completed without any issues.

zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 16, 2025
* giteaofficial/main:
  Only allow admins to rename default/protected branches (go-gitea#33276)
  Enable Typescript `noImplicitThis` (go-gitea#33250)
  Prepare for support performance trace (go-gitea#33286)
  Fix closed dependency title (go-gitea#33285)
  Move some Actions related functions from `routers` to `services` (go-gitea#33280)
  Fix incorrect TagName/BranchName usages (go-gitea#33279)
@silverwind
Copy link
Member Author

silverwind commented Jan 16, 2025

Thanks for testing. I usually don't test changes when I just add TS annotations or move code around. Any potential issues from it would already have been caught by TS itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants